package com.tonann.app.domain;

import com.tonann.common.annotation.Excel;
import com.tonann.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 运算规则对象 app_energy_caculated_rule
 *
 * @author tonann
 * @date 2022-10-21
 */
public class AppEnergyCaculatedRule extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    private Long ruleId;

    /**
     * 传感器ID
     */
    @Excel(name = "传感器ID")
    private Long sensorId;

    /**
     * 从属传感器ID
     */
    @Excel(name = "从属传感器ID")
    private Long objectId;

    /**
     * 分母
     */
    @Excel(name = "分母")
    private Long denominator;

    /**
     * 分子
     */
    @Excel(name = "分子")
    private Long numerator;

    /**
     * 运算规则
     */
    @Excel(name = "运算规则")
    private String operation;

    private AppSensor mainSensor;

    private AppSensor objectSensor;

    public void setRuleId(Long ruleId) {
        this.ruleId = ruleId;
    }

    public Long getRuleId() {
        return ruleId;
    }

    public void setSensorId(Long sensorId) {
        this.sensorId = sensorId;
    }

    public Long getSensorId() {
        return sensorId;
    }

    public void setObjectId(Long objectId) {
        this.objectId = objectId;
    }

    public Long getObjectId() {
        return objectId;
    }

    public void setDenominator(Long denominator) {
        this.denominator = denominator;
    }

    public Long getDenominator() {
        return denominator;
    }

    public void setNumerator(Long numerator) {
        this.numerator = numerator;
    }

    public Long getNumerator() {
        return numerator;
    }

    public void setOperation(String operation) {
        this.operation = operation;
    }

    public String getOperation() {
        return operation;
    }

    public AppSensor getMainSensor() {
        return mainSensor;
    }

    public void setMainSensor(AppSensor mainSensor) {
        this.mainSensor = mainSensor;
    }

    public AppSensor getObjectSensor() {
        return objectSensor;
    }

    public void setObjectSensor(AppSensor objectSensor) {
        this.objectSensor = objectSensor;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("ruleId", getRuleId())
                .append("sensorId", getSensorId())
                .append("objectId", getObjectId())
                .append("denominator", getDenominator())
                .append("numerator", getNumerator())
                .append("operation", getOperation())
                .append("createBy", getCreateBy())
                .append("updateBy", getUpdateBy())
                .append("createTime", getCreateTime())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}
